<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="commonCrewLinkLine">
    <script src="/plugins/bootstraptable/bootstrap-table-fixed-columns.js"></script>
    <div class="ibox float-e-margins" style="margin-bottom:0;">
        <!--<div class="ibox-title ibox-title-blue">
            <h5><i class="fa fa-file-text"></i>&nbsp;人员排班<span id="person-name"></span></h5>
        </div>-->
        <div class="ibox-content">
            <table id="table-person-task" data-classes="table table-hover table-condensed">
            </table>
        </div>
    </div>
    <script th:inline="javascript">
        //初始化个人排班表格
        function initTablePersonTask(){
            columnsArray = [];
            var person = {
                "field": 'cName',
                "title": '人员'
            }
            columnsArray.push(person);
            for (var i = 0; i < 30; i++) {
                var date = addDateYYDD(new Date($("#flightDate").val()), (i - (30 - dayAfter)));
                var item = {
                    "field": date,
                    "title": date,
                }
                columnsArray.push(item);
            }
            $("#table-person-task").bootstrapTable("destroy").bootstrapTable({
                /*数据参数清单*/
                //分页参数
                data: tablePersonTaskData,
                clickToSelect: true,
                singleSelect: true,
                showRefresh: false,                  //是否显示刷新按钮
                uniqueId: 'id',
                striped: true,//行间隔色
                fixedColumns: true,
                fixedNumber: 1,
                locale: "${language}",
                onClickRow: function (row, $element) {
                    $element.addClass('info').siblings().removeClass('info').end();
                },
                columns: columnsArray
            });
        }
        /*function taskInfoFormatter(value, row, index){
            return row.workcode;
        }*/
    </script>
</div>

</body>

</html>

